package com.zy.cat.entity.dev;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Index;
import javax.persistence.Table;

import com.zy.cat.entity.primary.CatDevSignedHistoryPrimary;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @info 9趣猫用户七日签到历史纪录
 * @author Link
 * @date 2019-10-30 09:14
 */
@Entity
@Table(name = "zy_cat_user_signed_history", indexes = {
		@Index(name = "pid", columnList = "pid"),
		@Index(name = "stime", columnList = "stime")
		 })
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("9趣猫用户七日签到历史纪录体类")
@IdClass(CatDevSignedHistoryPrimary.class)
public class CatDevSignedHistory {
 
	@Id
	@Column(columnDefinition = "VARCHAR(20) NOT NULL COMMENT '用户账号ID[9趣猫用户七日签到历史纪录]'")
	@ApiModelProperty(value = "用户账号ID", example = "fe53d6a4fa29641")
	private String pid;
	
	@Id
	@Column(columnDefinition = "VARCHAR(10) NOT NULL  COMMENT '签到时间'")
	@ApiModelProperty(value = "签到时间", example = "2019-02-22")
	private String stime;
	
	@Column(name = "is_start",columnDefinition = "int(1) DEFAULT '0'  COMMENT '是否为七天签到起点(0.非七日签到的第一天、1.是七天签到的第一天)'")
	@ApiModelProperty(value = "是否为七天签到起点", example = "0")
	private int isStart;
	
	@Column(name = "sign_status",columnDefinition = "int(1) DEFAULT '1'  COMMENT '签到状态(0.未签到、1.签到成功、2.签到失败)'")
	@ApiModelProperty(value = "签到状态(0.未签到、1.签到成功、2.签到失败)", example = "0")
	private int signStatus;
	
	@Column(columnDefinition = "VARCHAR(20) NOT NULL  COMMENT '更新时间'")
	@ApiModelProperty(value = "更新时间", example = "2019-02-22 10:10:10")
	private String ltime;

	public CatDevSignedHistory(String pid) {
		super();
		this.pid = pid;
	}

	public CatDevSignedHistory(String pid, String stime, int isStart, String ltime) {
		super();
		this.pid = pid;
		this.stime = stime;
		this.isStart = isStart;
		this.ltime = ltime;
	}
	
}
